#include <iostream>
using namespace std;

/*
Create a class without any constructors, 
and show that you can create objects with the default constructor. 

Now create a nondefault constructor (one with an argument) for the class, 
and try compiling again. Explain what happened.
*/
class C1{
public:
    int data;

    C1(int data){
        this->data=data;
    }
};

int main(){
    //error: C1 c1;
    C1 c1(10);
    return 0;
}

//总结：
//如果我们没有写构造函数，编译器提供无参的默认构造函数
//如果我们写了有参构造函数，编译器就不再提供默认构造函数